// makeswf -v 7 -r 1 -o test-7.swf test.as

function compare (a, b)
{
  trace (a + " vs. " + b);

  if (a < b) {
    return -1;
  } else if (b < a) {
    return 1;
  } else {
    return 0;
  }
}

var a = [ 268, 310, 431, 183, 236, 276, 42, 296, 218, 42, 281, 318, 96, 343,
    272, 271, 338, 415, 99, 390, 399, 145, 15, 238, 28, 30, 484, 486, 43, 213,
    383, 383, 399, 473, 167, 76, 467, 350, 127, 171, 31, 390, 303, 458, 421,
    74, 72, 44, 145, 75, 43, 369, 420, 483, 42, 382, 88, 136, 226, 432, 268,
    114, 478, 115, 414, 118, 148, 350, 337, 211, 168, 478, 489, 313, 208, 389,
    144, 185, 166, 205, 460, 108, 64, 344, 270, 352, 136, 30, 238, 254, 32,
    193, 75, 435, 84, 202, 190, 241, 313, 237, 89, 53, 224, 299, 295, 461, 63,
    358, 66, 422, 19, 443, 29, 331, 157, 50, 172, 447, 376, 91, 308, 197, 82,
    410, 40, 171, 402, 209, 407, 285, 382, 126, 366, 235, 49, 119, 92, 159, 30,
    216, 354, 158, 10, 283, 281, 324, 372, 87, 143, 479, 485, 278, 422, 365,
    33, 449, 272, 352, 496, 468, 211, 441, 446, 265, 181, 75, 51, 419, 325, 38,
    341, 341, 287, 293, 246, 58, 42, 322, 354, 132, 1, 162, 449, 132, 142, 67,
    122, 191, 312, 463, 30, 155, 4, 189, 97, 332, 107, 467, 58, 457, 430, 31,
    354, 303, 92, 71, 463, 22, 114, 154, 294, 14, 458, 251, 181, 415, 135, 184,
    2, 209, 51, 448, 382, 193, 405, 362, 248, 36, 250, 249, 291, 442, 259, 349,
    129, 6, 293, 117, 74, 212, 47, 39, 113, 80, 349, 104, 259, 484, 318, 459,
    14, 266, 134, 143, 5, 423, 36, 274, 122, 201, 16, 360, 262, 427, 45, 150,
    146, 318, 402, 30, 194, 217, 312, 495, 263, 106, 500, 492, 295, 31, 422,
    59, 315, 486, 293, 138, 142, 272, 437, 81, 186, 453, 112, 406, 397, 335,
    367, 240, 254, 147, 8, 109, 387, 23, 68, 56, 268, 180, 295, 30, 302, 188,
    184, 168, 32, 398, 125, 370, 114, 21, 451, 434, 269, 418, 119, 160, 46,
    194, 76, 261, 250, 322, 64, 22, 409, 247, 278, 349, 399, 444, 137, 34, 422,
    378, 426, 219, 200, 267, 273, 119, 47, 98, 41, 377, 471, 105, 483, 486,
    248, 1, 426, 270, 437, 243, 209, 213, 354, 85, 177, 384, 94, 15, 8, 70,
    411, 422, 217, 278, 221, 208, 364, 8, 35, 295, 140, 145, 450, 362, 31, 83,
    101, 269, 368, 31, 51, 437, 120, 165, 74, 55, 356, 64, 493, 355, 78, 318,
    222, 2, 114, 238, 342, 102, 493, 382, 251, 169, 480, 114, 348, 468, 360,
    276, 214, 182, 32, 54, 439, 470, 422, 78, 172, 325, 211, 349, 401, 394,
    323, 49, 95, 74, 99, 74, 30, 163, 197, 464, 31, 472, 404, 184, 219, 428,
    448, 175, 243, 432, 125, 492, 282, 233, 332, 336, 48, 408, 374, 230, 302,
    298, 284, 245, 221, 354, 318, 156, 240, 328, 187, 57, 74, 16, 425, 367,
    500, 491, 196, 447, 381, 120, 488, 272, 211, 61, 327, 195, 500, 354, 486,
    392, 286, 209, 385, 123, 302, 129, 426, 341, 319, 268, 269, 4, 74, 359,
    209, 331, 24, 462, 39, 163, 86, 76, 311, 399, 375, 250, 5, 304, 115, 295,
    491, 258, 324, 314, 248, 97, 343, 31, 424, 388, 482, 43, 422, 194, 76, 263,
    333, 278, 49, 244, 313, 430, 478, 235, 328, 86, 160, 71, 102, 89, 399, 219,
    277, 36, 54, 328, 39, 12, 20, 60, 189, 114, 346, 135, 195, 75, 16, 21, 161,
    357, 429, 193, 366, 122, 136, 217, 126, 39, 100, 361, 137, 342, 358, 391,
    474, 372, 9, 119, 393, 199, 289, 7, 357, 466, 51, 246, 145, 468, 264, 414,
    128, 328, 14, 306, 486, 201, 225, 494, 96, 58, 248, 323, 105, 456, 138, 97,
    229, 380, 83, 171, 317, 167, 217, 173, 496, 103, 448, 311, 114, 253, 373,
    15, 52, 455, 233, 50, 96, 469, 238, 62, 225, 278, 210, 17, 318, 195, 387,
    13, 226, 41, 295, 351, 476, 368, 217, 312, 481, 227, 482, 195, 59, 176,
    465, 464, 250, 438, 30, 166, 226, 493, 326, 295, 102, 96, 272, 480, 483,
    486, 234, 321, 5, 178, 477, 74, 328, 74, 386, 26, 349, 206, 107, 149, 207,
    152, 312, 209, 417, 427, 480, 492, 399, 290, 265, 198, 367, 8, 256, 367,
    342, 16, 239, 102, 176, 145, 458, 20, 495, 453, 114, 292, 174, 376, 151,
    116, 312, 356, 353, 42, 9, 215, 171, 497, 74, 119, 78, 242, 279, 65, 31,
    496, 202, 223, 240, 379, 90, 395, 490, 163, 15, 363, 184, 301, 75, 354, 53,
    69, 312, 476, 199, 442, 153, 492, 146, 139, 245, 333, 141, 74, 245, 371,
    365, 126, 39, 328, 279, 362, 418, 195, 316, 30, 186, 204, 367, 11, 433,
    186, 309, 275, 32, 423, 211, 338, 193, 314, 408, 57, 217, 225, 34, 102,
    238, 133, 232, 343, 77, 231, 32, 498, 184, 347, 270, 487, 122, 483, 260,
    481, 298, 499, 121, 448, 120, 74, 161, 367, 134, 241, 300, 22, 330, 437,
    434, 250, 107, 56, 112, 107, 416, 342, 220, 480, 64, 218, 225, 111, 329,
    461, 436, 66, 41, 226, 257, 192, 440, 426, 130, 463, 493, 32, 354, 37, 413,
    418, 93, 243, 5, 208, 107, 335, 18, 474, 307, 87, 489, 419, 403, 253, 195,
    48, 102, 320, 5, 58, 268, 277, 27, 264, 210, 114, 400, 360, 318, 358, 301,
    161, 475, 420, 31, 42, 123, 452, 118, 203, 312, 73, 41, 340, 451, 348, 331,
    193, 339, 499, 425, 57, 30, 243, 21, 229, 164, 188, 255, 25, 349, 151, 332,
    396, 210, 305, 449, 170, 135, 185, 3, 60, 297, 253, 328, 114, 482, 90, 253,
    228, 131, 392, 277, 351, 119, 280, 377, 9, 110, 463, 180, 149, 288, 255,
    334, 360, 339, 345, 208, 97, 166, 191, 179, 240, 377, 412, 124, 79, 500,
    196, 247, 252, 117, 381, 372, 243, 132, 122, 226, 464, 399, 445, 273, 418,
    146, 322, 452, 454, 186, 264 ];
trace (a);
trace (a.concat ().sort (compare, Array.NUMERIC));
trace (a.concat ().sort (compare, Array.NUMERIC | Array.DESCENDING));
trace (a.concat ().sort (compare, Array.NUMERIC | Array.UNIQUESORT));

loadMovie ("FSCommand:quit", "");
